const app = getApp()
import { waterfallCalc } from "@/utils/utils";
import Api from '@/services/api.js';
export default {
  props: {
    width: {
      type: String,
      default: '100%'
    },
    margin: {
      type: String,
      default: ''
    },
    info: {
      type: Object,
      default: {}
    },
    // 是否可以修改企业信息
    canChange: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
    }
  },
  watch: {
  },
  computed: {
    privacyData() {
      return this.$store.state.privacyData;
    },
    companyInfo() {
      return this.$store.state.companyInfo;
    },
    // 是否是BOSS
    isBoss() {
      return this.privacyData.roles.includes('boss');
    }
  },
  mounted() {

  },
  methods: {
    handleTap() {
      if (!this.isBoss || !this.canChange) return;
      uni.navigateTo({
        url: '/enterpriseMgmt/list/index',
        events: {
          refresh: () => {
            this.$emit('onChange')
          }
        }
      });
    }
  }
}